<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------

// +----------------------------------------------------------------------
// | 缓存设置
// +----------------------------------------------------------------------
use think\facade\Env;
return [
    // 缓存配置为复合类型
    'type'  =>  'complex',
    'default'	=>	[
        'type'	=>	Env::get('cache.default_type','file'),
        // 全局缓存有效期（0为永久有效）
        'expire'=>  Env::get('cache.default_expire',0),
        // 缓存前缀
        'prefix'=>  Env::get('cache.default_prefix','think'),
    ],
    'file'   =>  [
        'type'   => 'file',
        'path'   => Env::get('cache.default_path','../runtime/cache/'),
    ],
    'redis'	=>	[
        'type'	=>	'redis',
        'host'	=>	Env::get('cache.redis_host','127.0.0.1'),
        'port' =>  Env::get('cache.redis_port','6379'),
    ],
];
